<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: spi.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('da/d87/spi_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">spi.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Name        : spi.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Author      : uCXpresso</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Version     : v1.0.1</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> Date        : 2014/3/14</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> Copyright   : Copyright (C) www.embeda.com.tw</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> Description : SPI class</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">                                 History</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> DATE     | VERSION |   DESCRIPTIONS                             |  By</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> 2014/1/1   v1.0.0  First Edition for nano11Uxx                     Jason</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> 2014/3/14  v1.0.1  modify inline write() member function           Jason</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#ifndef SPI_H_</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SPI_H_</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;class/peripheral.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;class/stream.h&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;class/pin.h&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga1adbe6bf70e3880dc6b9f86e58bb7f98">   29</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98a7add1e0588a075d9385b10fcbb2010f4">   30</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98a7add1e0588a075d9385b10fcbb2010f4">SPI0</a> = 0,   </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98add83ddb396fbcb33f2d61248e5c4a185">   31</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98add83ddb396fbcb33f2d61248e5c4a185">SPI1</a> = 1    </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga1adbe6bf70e3880dc6b9f86e58bb7f98">SPI_PORT_T</a>;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">   37</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a64705286435d5114a76f86a968ef8792">   38</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a64705286435d5114a76f86a968ef8792">SPI_DATABIT_4</a>   = 3,</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a3c054e565748e039f8a993cc3c1bbd12">   39</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a3c054e565748e039f8a993cc3c1bbd12">SPI_DATABIT_5</a>   = 4,</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ad1b40902d4a6ea8e530dba2726f02207">   40</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ad1b40902d4a6ea8e530dba2726f02207">SPI_DATABIT_6</a>   = 5,</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae6ee06dab1f176913de97aa2387245e8">   41</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae6ee06dab1f176913de97aa2387245e8">SPI_DATABIT_7</a>   = 6,</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08aacec2971122bd7fe38869827a0a8e5d7">   42</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08aacec2971122bd7fe38869827a0a8e5d7">SPI_DATABIT_8</a>   = 7,    </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a4c0d551df55cd135ec1ab1b3e5ae968b">   43</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a4c0d551df55cd135ec1ab1b3e5ae968b">SPI_DATABIT_9</a>   = 8,</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a61458c0785d8b1c087c058d209b14132">   44</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a61458c0785d8b1c087c058d209b14132">SPI_DATABIT_10</a>  = 9,</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a2e29ad47c0b74b24c367774b3a522430">   45</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a2e29ad47c0b74b24c367774b3a522430">SPI_DATABIT_11</a>  = 10,</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a0df5bd143f03fd13eb9473e72e809a65">   46</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a0df5bd143f03fd13eb9473e72e809a65">SPI_DATABIT_12</a>  = 11,</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae62ac0809dac7a9204dfa9dbac921c3d">   47</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae62ac0809dac7a9204dfa9dbac921c3d">SPI_DATABIT_13</a>  = 12,</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a5e4d710eb39940ae4a60ce5c55adb219">   48</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a5e4d710eb39940ae4a60ce5c55adb219">SPI_DATABIT_14</a>  = 13,</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1e09b3d06036c301c246ed91e5d525f3">   49</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1e09b3d06036c301c246ed91e5d525f3">SPI_DATABIT_15</a>  = 14,</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1fdcee481a470c70530db784d721d226">   50</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1fdcee481a470c70530db784d721d226">SPI_DATABIT_16</a>  = 15</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">SPI_DATABIT_T</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">   56</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">   57</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">SPI_MODE_0</a> = 0, </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a7c1990cc15e9d69621be8e0e757e634c">   58</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a7c1990cc15e9d69621be8e0e757e634c">SPI_MODE_1</a>,     </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a4d350945d895a4acdc45ae96b0b82fc3">   59</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a4d350945d895a4acdc45ae96b0b82fc3">SPI_MODE_2</a>,     </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873af06ec36087996d6f328df39866ff5de6">   60</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873af06ec36087996d6f328df39866ff5de6">SPI_MODE_3</a>      </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">SPI_MODE_T</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">   66</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a3fa35f661bf7fbb96c05ff70827553be">   67</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a3fa35f661bf7fbb96c05ff70827553be">SPI_MSBFIRST</a> = 0,   </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a183d076e845f5ea5d99465cd6aff505f">   68</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a183d076e845f5ea5d99465cd6aff505f">SPI_LSBFIRST</a> = 1    </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">SPI_BIT_ORDER_T</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">   74</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">   75</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a> = 0,     </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654abc98c1546fe12d3fceb1f86cf670faa9">   76</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654abc98c1546fe12d3fceb1f86cf670faa9">SPI_SLAVE</a> = 1       </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html">   84</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d2/d3f/class_c_s_p_i.html">CSPI</a>: <span class="keyword">public</span> <a class="code" href="../../d9/db6/class_c_peripheral.html">CPeripheral</a> {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a45ebc1852b74f5f0ccfbb97b302cf5e9">CSPI</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga1adbe6bf70e3880dc6b9f86e58bb7f98">SPI_PORT_T</a> port=<a class="code" href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98a7add1e0588a075d9385b10fcbb2010f4">SPI0</a>, <span class="keywordtype">bool</span> pullup=<span class="keyword">true</span>);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#accc9a5c831ee85e95f0bb5567de5f529">format</a>(<a class="code" href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">SPI_DATABIT_T</a> bits, <a class="code" href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">SPI_MODE_T</a> mode=<a class="code" href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">SPI_MODE_0</a>);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#aa7a160dad74689b9afb720c78d63558f">bitOrder</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">SPI_BIT_ORDER_T</a> value);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#ad8143fa5be48bc62762fda52b86d630a">frequency</a>(uint32_t hz);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a7dc9ce9f0b38a59f7332e6f4f39864e8">enable</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a> role=<a class="code" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a>);    <span class="comment">// enable SPI</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5009ac7cc08bcf2b1d1be19b320424e6">disable</a>();                             <span class="comment">// disable SPI</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#ab237c0acc917287a8f7cdca7e91e87c6">isSlave</a>();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="comment">// for arduino user</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a98fb4712f52c9977d4973430f5f505b8">  129</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a98fb4712f52c9977d4973430f5f505b8">begin</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a> role=<a class="code" href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a>) { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a7dc9ce9f0b38a59f7332e6f4f39864e8">enable</a>(role); }</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a9a8f9843e54bf4f11dd871cf798fe337">  130</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a9a8f9843e54bf4f11dd871cf798fe337">end</a>() { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5009ac7cc08bcf2b1d1be19b320424e6">disable</a>(); }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(<span class="keywordtype">void</span> *txbuf, <span class="keywordtype">void</span> *rxbuf, uint32_t length);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#ab702047e1d0378b4c9b893bce96a2863">  146</a></span>&#160;    <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#ab702047e1d0378b4c9b893bce96a2863">readwrite</a>(uint8_t tx, uint8_t &amp;rx) {</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(&amp;tx, &amp;rx, 1);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a173cd30c8b9d9b1a40d6f849a517932b">  154</a></span>&#160;    <span class="keyword">virtual</span> <span class="keyword">inline</span> uint8_t <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a173cd30c8b9d9b1a40d6f849a517932b">write</a>(uint8_t tx) {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        uint8_t rx;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(&amp;tx, &amp;rx, 1);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">return</span> rx;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    }</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="comment">// inline shorthand operators</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">  163</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">operator &gt;&gt; </a>(uint8_t &amp;val) { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(NULL, &amp;val, 1); }</div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">  164</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">operator &lt;&lt; </a>(uint8_t val)  { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(&amp;val, NULL, 1); }</div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#ac53ab106be8d0f369b349f82b3db6813">  165</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">operator &gt;&gt; </a>(uint16_t &amp;val) { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(NULL, &amp;val, 2); }</div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a272f5e518d21194dbc996f5f5475ae02">  166</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">operator &lt;&lt; </a>(uint16_t val)  { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(&amp;val, NULL, 2); }</div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#aaf1a92290aaee5a93f8fc2db9ce4a512">  167</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">operator &gt;&gt; </a>(uint32_t &amp;val) { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(NULL, &amp;val, 4); }</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="../../d2/d3f/class_c_s_p_i.html#a4d0cd48d0bba271fd72df43d7528e2a0">  168</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">operator &lt;&lt; </a>(uint32_t val)  { <a class="code" href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">readwrite</a>(&amp;val, NULL, 4); }</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="../../d2/d3f/class_c_s_p_i.html">CSPI</a>();</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ga1adbe6bf70e3880dc6b9f86e58bb7f98">SPI_PORT_T</a>  m_port;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    uint32_t    m_nFlag;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;};</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="../../d9/d9b/class_c_spi_master.html">  183</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d9/d9b/class_c_spi_master.html">CSpiMaster</a>: <span class="keyword">public</span> <a class="code" href="../../d2/d3f/class_c_s_p_i.html">CSPI</a> {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <a class="code" href="../../d9/d9b/class_c_spi_master.html#ad84a4c9c901f4c1793b9d1dfcfa754b0">CSpiMaster</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a> selPin, <span class="keywordtype">bool</span> pullup=<span class="keyword">true</span>);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="../../d9/d9b/class_c_spi_master.html#a13d1514765c41561d16dd46eefb9926e">readwrite</a>(<span class="keywordtype">void</span> *txbuf, <span class="keywordtype">void</span> *rxbuf, uint32_t length);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <a class="code" href="../../d7/db9/class_c_pin.html">CPin</a>        m_cs;   <span class="comment">// chip select pin</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="comment"></span>};</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SPI_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08aacec2971122bd7fe38869827a0a8e5d7"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08aacec2971122bd7fe38869827a0a8e5d7">SPI_DATABIT_8</a></div><div class="ttdoc">Default. </div><div class="ttdef"><b>Definition:</b> spi.h:42</div></div>
<div class="ttc" id="class_c_s_p_i_html_a173cd30c8b9d9b1a40d6f849a517932b"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a173cd30c8b9d9b1a40d6f849a517932b">CSPI::write</a></div><div class="ttdeci">virtual uint8_t write(uint8_t tx)</div><div class="ttdef"><b>Definition:</b> spi.h:154</div></div>
<div class="ttc" id="class_c_spi_master_html"><div class="ttname"><a href="../../d9/d9b/class_c_spi_master.html">CSpiMaster</a></div><div class="ttdef"><b>Definition:</b> spi.h:183</div></div>
<div class="ttc" id="class_c_s_p_i_html_ad8143fa5be48bc62762fda52b86d630a"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#ad8143fa5be48bc62762fda52b86d630a">CSPI::frequency</a></div><div class="ttdeci">bool frequency(uint32_t hz)</div></div>
<div class="ttc" id="group___enumerations_html_gga1adbe6bf70e3880dc6b9f86e58bb7f98add83ddb396fbcb33f2d61248e5c4a185"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98add83ddb396fbcb33f2d61248e5c4a185">SPI1</a></div><div class="ttdoc">internal used!! </div><div class="ttdef"><b>Definition:</b> spi.h:31</div></div>
<div class="ttc" id="class_c_s_p_i_html_a3ce438bee4e3c087e44b3cf2b1690ecd"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a3ce438bee4e3c087e44b3cf2b1690ecd">CSPI::operator&lt;&lt;</a></div><div class="ttdeci">void operator&lt;&lt;(uint8_t val)</div><div class="ttdef"><b>Definition:</b> spi.h:164</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a61458c0785d8b1c087c058d209b14132"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a61458c0785d8b1c087c058d209b14132">SPI_DATABIT_10</a></div><div class="ttdef"><b>Definition:</b> spi.h:44</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a1e09b3d06036c301c246ed91e5d525f3"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1e09b3d06036c301c246ed91e5d525f3">SPI_DATABIT_15</a></div><div class="ttdef"><b>Definition:</b> spi.h:49</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a3c054e565748e039f8a993cc3c1bbd12"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a3c054e565748e039f8a993cc3c1bbd12">SPI_DATABIT_5</a></div><div class="ttdef"><b>Definition:</b> spi.h:39</div></div>
<div class="ttc" id="class_c_s_p_i_html_a45ebc1852b74f5f0ccfbb97b302cf5e9"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a45ebc1852b74f5f0ccfbb97b302cf5e9">CSPI::CSPI</a></div><div class="ttdeci">CSPI(SPI_PORT_T port=SPI0, bool pullup=true)</div></div>
<div class="ttc" id="class_c_s_p_i_html_aa7a160dad74689b9afb720c78d63558f"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#aa7a160dad74689b9afb720c78d63558f">CSPI::bitOrder</a></div><div class="ttdeci">void bitOrder(SPI_BIT_ORDER_T value)</div></div>
<div class="ttc" id="group___enumerations_html_gga422c6f9cdd9566ccf18ef0b43bcbc654abc98c1546fe12d3fceb1f86cf670faa9"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654abc98c1546fe12d3fceb1f86cf670faa9">SPI_SLAVE</a></div><div class="ttdoc">Slave. </div><div class="ttdef"><b>Definition:</b> spi.h:76</div></div>
<div class="ttc" id="group___enumerations_html_ga0d0ec25638f753b00013a2a99fed1ef4"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga0d0ec25638f753b00013a2a99fed1ef4">SPI_BIT_ORDER_T</a></div><div class="ttdeci">SPI_BIT_ORDER_T</div><div class="ttdef"><b>Definition:</b> spi.h:66</div></div>
<div class="ttc" id="group___enumerations_html_gga296b79fb83e48fbffa9ee5978d200873a4d350945d895a4acdc45ae96b0b82fc3"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a4d350945d895a4acdc45ae96b0b82fc3">SPI_MODE_2</a></div><div class="ttdoc">Mode 2: POL=1 / PHA=0. </div><div class="ttdef"><b>Definition:</b> spi.h:59</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a1fdcee481a470c70530db784d721d226"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a1fdcee481a470c70530db784d721d226">SPI_DATABIT_16</a></div><div class="ttdef"><b>Definition:</b> spi.h:50</div></div>
<div class="ttc" id="group___enumerations_html_gga1adbe6bf70e3880dc6b9f86e58bb7f98a7add1e0588a075d9385b10fcbb2010f4"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga1adbe6bf70e3880dc6b9f86e58bb7f98a7add1e0588a075d9385b10fcbb2010f4">SPI0</a></div><div class="ttdoc">default spi port </div><div class="ttdef"><b>Definition:</b> spi.h:30</div></div>
<div class="ttc" id="class_c_spi_master_html_a13d1514765c41561d16dd46eefb9926e"><div class="ttname"><a href="../../d9/d9b/class_c_spi_master.html#a13d1514765c41561d16dd46eefb9926e">CSpiMaster::readwrite</a></div><div class="ttdeci">virtual int readwrite(void *txbuf, void *rxbuf, uint32_t length)</div></div>
<div class="ttc" id="class_c_s_p_i_html_a5009ac7cc08bcf2b1d1be19b320424e6"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a5009ac7cc08bcf2b1d1be19b320424e6">CSPI::disable</a></div><div class="ttdeci">virtual void disable()</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a4c0d551df55cd135ec1ab1b3e5ae968b"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a4c0d551df55cd135ec1ab1b3e5ae968b">SPI_DATABIT_9</a></div><div class="ttdef"><b>Definition:</b> spi.h:43</div></div>
<div class="ttc" id="group___enumerations_html_gga296b79fb83e48fbffa9ee5978d200873a7c1990cc15e9d69621be8e0e757e634c"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a7c1990cc15e9d69621be8e0e757e634c">SPI_MODE_1</a></div><div class="ttdoc">Mode 1: POL=0 / PHA=1. </div><div class="ttdef"><b>Definition:</b> spi.h:58</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a5e4d710eb39940ae4a60ce5c55adb219"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a5e4d710eb39940ae4a60ce5c55adb219">SPI_DATABIT_14</a></div><div class="ttdef"><b>Definition:</b> spi.h:48</div></div>
<div class="ttc" id="group___enumerations_html_gga0d0ec25638f753b00013a2a99fed1ef4a183d076e845f5ea5d99465cd6aff505f"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a183d076e845f5ea5d99465cd6aff505f">SPI_LSBFIRST</a></div><div class="ttdef"><b>Definition:</b> spi.h:68</div></div>
<div class="ttc" id="class_c_s_p_i_html_ab237c0acc917287a8f7cdca7e91e87c6"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#ab237c0acc917287a8f7cdca7e91e87c6">CSPI::isSlave</a></div><div class="ttdeci">bool isSlave()</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08ad1b40902d4a6ea8e530dba2726f02207"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ad1b40902d4a6ea8e530dba2726f02207">SPI_DATABIT_6</a></div><div class="ttdef"><b>Definition:</b> spi.h:40</div></div>
<div class="ttc" id="class_c_pin_html"><div class="ttname"><a href="../../d7/db9/class_c_pin.html">CPin</a></div><div class="ttdef"><b>Definition:</b> pin.h:98</div></div>
<div class="ttc" id="group___enumerations_html_gae74cec5e96015c8083810d69358f8f08"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gae74cec5e96015c8083810d69358f8f08">SPI_DATABIT_T</a></div><div class="ttdeci">SPI_DATABIT_T</div><div class="ttdef"><b>Definition:</b> spi.h:37</div></div>
<div class="ttc" id="group___enumerations_html_ga1adbe6bf70e3880dc6b9f86e58bb7f98"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga1adbe6bf70e3880dc6b9f86e58bb7f98">SPI_PORT_T</a></div><div class="ttdeci">SPI_PORT_T</div><div class="ttdef"><b>Definition:</b> spi.h:29</div></div>
<div class="ttc" id="group___enumerations_html_ga65a2241721e4acb573e0c3fe29ac432f"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga65a2241721e4acb573e0c3fe29ac432f">PIN_NAME_T</a></div><div class="ttdeci">PIN_NAME_T</div><div class="ttdef"><b>Definition:</b> pin.h:27</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08ae62ac0809dac7a9204dfa9dbac921c3d"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae62ac0809dac7a9204dfa9dbac921c3d">SPI_DATABIT_13</a></div><div class="ttdef"><b>Definition:</b> spi.h:47</div></div>
<div class="ttc" id="class_c_s_p_i_html_a7dc9ce9f0b38a59f7332e6f4f39864e8"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a7dc9ce9f0b38a59f7332e6f4f39864e8">CSPI::enable</a></div><div class="ttdeci">virtual void enable(SPI_ROLE_T role=SPI_MASTER)</div></div>
<div class="ttc" id="class_c_s_p_i_html_accc9a5c831ee85e95f0bb5567de5f529"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#accc9a5c831ee85e95f0bb5567de5f529">CSPI::format</a></div><div class="ttdeci">void format(SPI_DATABIT_T bits, SPI_MODE_T mode=SPI_MODE_0)</div></div>
<div class="ttc" id="class_c_s_p_i_html_a98fb4712f52c9977d4973430f5f505b8"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a98fb4712f52c9977d4973430f5f505b8">CSPI::begin</a></div><div class="ttdeci">void begin(SPI_ROLE_T role=SPI_MASTER)</div><div class="ttdef"><b>Definition:</b> spi.h:129</div></div>
<div class="ttc" id="class_c_s_p_i_html_a24ca202a0494b84a92ff56d10725ce40"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a24ca202a0494b84a92ff56d10725ce40">CSPI::operator&gt;&gt;</a></div><div class="ttdeci">void operator&gt;&gt;(uint8_t &amp;val)</div><div class="ttdef"><b>Definition:</b> spi.h:163</div></div>
<div class="ttc" id="class_c_spi_master_html_ad84a4c9c901f4c1793b9d1dfcfa754b0"><div class="ttname"><a href="../../d9/d9b/class_c_spi_master.html#ad84a4c9c901f4c1793b9d1dfcfa754b0">CSpiMaster::CSpiMaster</a></div><div class="ttdeci">CSpiMaster(PIN_NAME_T selPin, bool pullup=true)</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a0df5bd143f03fd13eb9473e72e809a65"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a0df5bd143f03fd13eb9473e72e809a65">SPI_DATABIT_12</a></div><div class="ttdef"><b>Definition:</b> spi.h:46</div></div>
<div class="ttc" id="class_c_s_p_i_html"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html">CSPI</a></div><div class="ttdef"><b>Definition:</b> spi.h:84</div></div>
<div class="ttc" id="group___enumerations_html_gga0d0ec25638f753b00013a2a99fed1ef4a3fa35f661bf7fbb96c05ff70827553be"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga0d0ec25638f753b00013a2a99fed1ef4a3fa35f661bf7fbb96c05ff70827553be">SPI_MSBFIRST</a></div><div class="ttdoc">default </div><div class="ttdef"><b>Definition:</b> spi.h:67</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08ae6ee06dab1f176913de97aa2387245e8"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08ae6ee06dab1f176913de97aa2387245e8">SPI_DATABIT_7</a></div><div class="ttdef"><b>Definition:</b> spi.h:41</div></div>
<div class="ttc" id="group___enumerations_html_ga296b79fb83e48fbffa9ee5978d200873"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga296b79fb83e48fbffa9ee5978d200873">SPI_MODE_T</a></div><div class="ttdeci">SPI_MODE_T</div><div class="ttdef"><b>Definition:</b> spi.h:56</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a64705286435d5114a76f86a968ef8792"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a64705286435d5114a76f86a968ef8792">SPI_DATABIT_4</a></div><div class="ttdef"><b>Definition:</b> spi.h:38</div></div>
<div class="ttc" id="class_c_s_p_i_html_a9a8f9843e54bf4f11dd871cf798fe337"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a9a8f9843e54bf4f11dd871cf798fe337">CSPI::end</a></div><div class="ttdeci">void end()</div><div class="ttdef"><b>Definition:</b> spi.h:130</div></div>
<div class="ttc" id="class_c_s_p_i_html_a5215a320db4cb5f2792ea18f8d6e0671"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#a5215a320db4cb5f2792ea18f8d6e0671">CSPI::readwrite</a></div><div class="ttdeci">virtual int readwrite(void *txbuf, void *rxbuf, uint32_t length)</div></div>
<div class="ttc" id="group___enumerations_html_gga296b79fb83e48fbffa9ee5978d200873af06ec36087996d6f328df39866ff5de6"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873af06ec36087996d6f328df39866ff5de6">SPI_MODE_3</a></div><div class="ttdoc">Mode 3: POL=1 / PHA=1. </div><div class="ttdef"><b>Definition:</b> spi.h:60</div></div>
<div class="ttc" id="group___enumerations_html_ga422c6f9cdd9566ccf18ef0b43bcbc654"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga422c6f9cdd9566ccf18ef0b43bcbc654">SPI_ROLE_T</a></div><div class="ttdeci">SPI_ROLE_T</div><div class="ttdef"><b>Definition:</b> spi.h:74</div></div>
<div class="ttc" id="group___enumerations_html_ggae74cec5e96015c8083810d69358f8f08a2e29ad47c0b74b24c367774b3a522430"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae74cec5e96015c8083810d69358f8f08a2e29ad47c0b74b24c367774b3a522430">SPI_DATABIT_11</a></div><div class="ttdef"><b>Definition:</b> spi.h:45</div></div>
<div class="ttc" id="class_c_peripheral_html"><div class="ttname"><a href="../../d9/db6/class_c_peripheral.html">CPeripheral</a></div><div class="ttdef"><b>Definition:</b> peripheral.h:27</div></div>
<div class="ttc" id="class_c_s_p_i_html_ab702047e1d0378b4c9b893bce96a2863"><div class="ttname"><a href="../../d2/d3f/class_c_s_p_i.html#ab702047e1d0378b4c9b893bce96a2863">CSPI::readwrite</a></div><div class="ttdeci">virtual int readwrite(uint8_t tx, uint8_t &amp;rx)</div><div class="ttdef"><b>Definition:</b> spi.h:146</div></div>
<div class="ttc" id="group___enumerations_html_gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga296b79fb83e48fbffa9ee5978d200873a152359b11fb4b43ed0c5485eb0ab0673">SPI_MODE_0</a></div><div class="ttdoc">Mode 0: POL=0 / PHA=0. </div><div class="ttdef"><b>Definition:</b> spi.h:57</div></div>
<div class="ttc" id="group___enumerations_html_gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga422c6f9cdd9566ccf18ef0b43bcbc654a84379dc90398ca075038c8d5ee465f6a">SPI_MASTER</a></div><div class="ttdoc">Master. </div><div class="ttdef"><b>Definition:</b> spi.h:75</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d9ab3e09413249e340719d1c246acc66.html">Jason Project</a></li><li class="navelem"><a class="el" href="../../dir_e60b0d0338763df7a227cbecf5ac6106.html">Firmware</a></li><li class="navelem"><a class="el" href="../../dir_c8ef7bdfc8622ceb56fdbfff8f44a6b4.html">lpcxpresso</a></li><li class="navelem"><a class="el" href="../../dir_bc2544560b94a5512f672a61310393b1.html">ucxpresso.lite</a></li><li class="navelem"><a class="el" href="../../dir_89b485e3174b4ad30c1cd4b50a79dec9.html">uCXpresso.BLE</a></li><li class="navelem"><a class="el" href="../../dir_ef35519cefd621f663612ebad34cbfc9.html">inc</a></li><li class="navelem"><a class="el" href="../../dir_23b8956a4518e3beec6402c1bb795b19.html">class</a></li><li class="navelem"><b>spi.h</b></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
